import request from "@/utils/request.js";

// 查询学习计划
export function userPlanInfo() {
	return request({
		url: '/plan/getPlan/all',
		method: 'get',
		isLoading: false,
	})
}

// 修改学习计划
export function userEditPlan(data) {
	return request({
		url: '/plan/updatePlan',
		method: 'put',
		data,
		isLoading: true,
	})
}

//获取英文短文
export function getArticle(bookId,num) {
	return request({
		url: `/passage/newPassage/${bookId}/${num}`,
		method: 'get',
		isLoading: true,
	})
}

//翻译单词  /api/studyWord/getWord
export function transWords(data) {
	return request({
		url: `/studyWord/getWord?word=${data}`,
		method: 'post',
		// isLoading: true,
	})
}


export function unitArticle(data) {
	return request({
		url: '/passage/unitArticle',
		method: 'post',
		data,
		isLoading: true,
	})
}